Bug 523225 - modules/input/im*.c: MODULE_ENTRY macros make illegal code
authorTor Lillqvist <tml@novell.com>
Tue, 18 Mar 2008 21:29:00 +0000 (21:29 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Tue, 18 Mar 2008 21:29:00 +0000 (21:29 +0000)
2008-03-18  Tor Lillqvist  <tml@novell.com>

Bug 523225 - modules/input/im*.c: MODULE_ENTRY macros make illegal code

* modules/input/im*.c: Modify the MODULE_ENTRY macro so the
G_MODULE_ENTRY decoration can be put in a more correct place.

svn path=/trunk/; revision=19902

13 files changed:
ChangeLog
modules/input/imam-et.c
modules/input/imcedilla.c
modules/input/imcyrillic-translit.c
modules/input/imime.c
modules/input/iminuktitut.c
modules/input/imipa.c
modules/input/immultipress.c
modules/input/imthai.c
modules/input/imti-er.c
modules/input/imti-et.c
modules/input/imviqr.c
modules/input/imxim.c

index 275fca3910540a92d6f793d162a6b0974eded36f..064eeed5c3d59a618389c06bb05ad1bc44f1f853 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-03-18  Tor Lillqvist  <tml@novell.com>
+
+       Bug 523225 - modules/input/im*.c: MODULE_ENTRY macros make illegal code
+       
+       * modules/input/im*.c: Modify the MODULE_ENTRY macro so the
+       G_MODULE_ENTRY decoration can be put in a more correct place.
+
 2008-03-18  Sven Neumann  <sven@gimp.org>
 
        * gtk/gtkmountoperation.c (gtk_mount_operation_ask_password): set
index 8701d550be37719a79ec6875ca11d65779e2b789..5ba271e703bbcaef38312b6f8b9f40d4d63f5d9d 100644 (file)
@@ -462,32 +462,28 @@ static const GtkIMContextInfo *info_list[] = {
 };
 
 #ifndef INCLUDE_IM_am_et
-#define MODULE_ENTRY(function) G_MODULE_EXPORT im_module_ ## function
+#define MODULE_ENTRY(type,function) G_MODULE_EXPORT type im_module_ ## function
 #else
-#define MODULE_ENTRY(function) _gtk_immodule_am_et_ ## function
+#define MODULE_ENTRY(type, function) type _gtk_immodule_am_et_ ## function
 #endif
 
-void
-MODULE_ENTRY (init) (GTypeModule *module)
+MODULE_ENTRY (void, init) (GTypeModule *module)
 {
   am_et_register_type (module);
 }
 
-void 
-MODULE_ENTRY (exit) (void)
+MODULE_ENTRY (void, exit) (void)
 {
 }
 
-void 
-MODULE_ENTRY (list) (const GtkIMContextInfo ***contexts,
-                    int                      *n_contexts)
+MODULE_ENTRY (void, list) (const GtkIMContextInfo ***contexts,
+                          int                      *n_contexts)
 {
   *contexts = info_list;
   *n_contexts = G_N_ELEMENTS (info_list);
 }
 
-GtkIMContext *
-MODULE_ENTRY (create) (const gchar *context_id)
+MODULE_ENTRY (GtkIMContext *, create) (const gchar *context_id)
 {
   if (strcmp (context_id, "am_et") == 0)
     return g_object_new (type_am_et_translit, NULL);
index f3b0c9ff617db62d031f5555f23456833d8cb9cf..c74ba68f64ee687b2070435281acc0e97f148b74 100644 (file)
@@ -99,32 +99,28 @@ static const GtkIMContextInfo *info_list[] = {
 };
 
 #ifndef INCLUDE_IM_cedilla
-#define MODULE_ENTRY(function) G_MODULE_EXPORT im_module_ ## function
+#define MODULE_ENTRY(type, function) G_MODULE_EXPORT type im_module_ ## function
 #else
-#define MODULE_ENTRY(function) _gtk_immodule_cedilla_ ## function
+#define MODULE_ENTRY(type, function) type _gtk_immodule_cedilla_ ## function
 #endif
 
-void
-MODULE_ENTRY (init) (GTypeModule *module)
+MODULE_ENTRY (void, init) (GTypeModule *module)
 {
   cedilla_register_type (module);
 }
 
-void 
-MODULE_ENTRY (exit) (void)
+MODULE_ENTRY (void, exit) (void)
 {
 }
 
-void 
-MODULE_ENTRY (list) (const GtkIMContextInfo ***contexts,
-                    int                      *n_contexts)
+MODULE_ENTRY (void, list) (const GtkIMContextInfo ***contexts,
+                          int                      *n_contexts)
 {
   *contexts = info_list;
   *n_contexts = G_N_ELEMENTS (info_list);
 }
 
-GtkIMContext *
-MODULE_ENTRY (create) (const gchar *context_id)
+MODULE_ENTRY (GtkIMContext *, create) (const gchar *context_id)
 {
   if (strcmp (context_id, "cedilla") == 0)
     return g_object_new (type_cedilla, NULL);
index c7c9a0370b4e1e69c7c762f5495cb6c474750159..cf7fdb595e0e656d627fcd73a4a970be36729282 100644 (file)
@@ -225,32 +225,28 @@ static const GtkIMContextInfo *info_list[] = {
 };
 
 #ifndef INCLUDE_IM_cyrillic_translit
-#define MODULE_ENTRY(function) G_MODULE_EXPORT im_module_ ## function
+#define MODULE_ENTRY(type, function) G_MODULE_EXPORT type im_module_ ## function
 #else
-#define MODULE_ENTRY(function) _gtk_immodule_cyrillic_translit_ ## function
+#define MODULE_ENTRY(type, function) type _gtk_immodule_cyrillic_translit_ ## function
 #endif
 
-void
-MODULE_ENTRY (init) (GTypeModule *module)
+MODULE_ENTRY (void, init) (GTypeModule *module)
 {
   cyrillic_translit_register_type (module);
 }
 
-void 
-MODULE_ENTRY (exit) (void)
+MODULE_ENTRY (void, exit) (void)
 {
 }
 
-void 
-MODULE_ENTRY (list) (const GtkIMContextInfo ***contexts,
-                    int                      *n_contexts)
+MODULE_ENTRY (void, list) (const GtkIMContextInfo ***contexts,
+                          int                      *n_contexts)
 {
   *contexts = info_list;
   *n_contexts = G_N_ELEMENTS (info_list);
 }
 
-GtkIMContext *
-MODULE_ENTRY (create) (const gchar *context_id)
+MODULE_ENTRY (GtkIMContext *, create) (const gchar *context_id)
 {
   if (strcmp (context_id, "cyrillic_translit") == 0)
     return g_object_new (type_cyrillic_translit, NULL);
index 843917cdabdd3f27e6394c6c2cd19d1a919112a4..88b3cd1c3c3030f7a6f8b0269f474cd9e13f7eeb 100644 (file)
@@ -40,31 +40,27 @@ static const GtkIMContextInfo *info_list[] = {
 };
 
 #ifndef INCLUDE_IM_ime
-#define MODULE_ENTRY(function) G_MODULE_EXPORT im_module_ ## function
+#define MODULE_ENTRY(type,function) G_MODULE_EXPORT type im_module_ ## function
 #else
-#define MODULE_ENTRY(function) _gtk_immodule_ime_ ## function
+#define MODULE_ENTRY(type, function) type _gtk_immodule_ime_ ## function
 #endif
 
-void
-MODULE_ENTRY (init) (GTypeModule * module)
+MODULE_ENTRY (void, init) (GTypeModule * module)
 {
   gtk_im_context_ime_register_type (module);
 }
 
-void
-MODULE_ENTRY (exit) (void)
+MODULE_ENTRY (void, exit) (void)
 {
 }
 
-void
-MODULE_ENTRY (list) (const GtkIMContextInfo *** contexts, int *n_contexts)
+MODULE_ENTRY (void, list) (const GtkIMContextInfo *** contexts, int *n_contexts)
 {
   *contexts = info_list;
   *n_contexts = G_N_ELEMENTS (info_list);
 }
 
-GtkIMContext *
-MODULE_ENTRY (create) (const gchar * context_id)
+MODULE_ENTRY (GtkIMContext *, create) (const gchar * context_id)
 {
   g_return_val_if_fail (context_id, NULL);
 
index 86e97abbe1f7838bd7fc0713a184c75f088e9fb2..2311936f632f47bf3381be0231838e86b3f740e1 100644 (file)
@@ -135,32 +135,28 @@ static const GtkIMContextInfo *info_list[] = {
 };
 
 #ifndef INCLUDE_IM_inuktitut
-#define MODULE_ENTRY(function) G_MODULE_EXPORT im_module_ ## function
+#define MODULE_ENTRY(type, function) G_MODULE_EXPORT type im_module_ ## function
 #else
-#define MODULE_ENTRY(function) _gtk_immodule_inuktitut_ ## function
+#define MODULE_ENTRY(type, function) type _gtk_immodule_inuktitut_ ## function
 #endif
 
-void
-MODULE_ENTRY (init) (GTypeModule *module)
+MODULE_ENTRY (void, init) (GTypeModule *module)
 {
   inuktitut_register_type (module);
 }
 
-void 
-MODULE_ENTRY (exit) (void)
+MODULE_ENTRY (void, exit) (void)
 {
 }
 
-void 
-MODULE_ENTRY (list) (const GtkIMContextInfo ***contexts,
-                    int                      *n_contexts)
+MODULE_ENTRY (void, list) (const GtkIMContextInfo ***contexts,
+                          int                      *n_contexts)
 {
   *contexts = info_list;
   *n_contexts = G_N_ELEMENTS (info_list);
 }
 
-GtkIMContext *
-MODULE_ENTRY (create) (const gchar *context_id)
+MODULE_ENTRY (GtkIMContext *, create) (const gchar *context_id)
 {
   if (strcmp (context_id, "inuktitut") == 0)
     return g_object_new (type_inuktitut_translit, NULL);
index 853b3663c61990747956b4fa64d5ed49904fb6bf..10d944dd5d26e76c1f8f4bacc750e491c95a4e75 100644 (file)
@@ -153,32 +153,28 @@ static const GtkIMContextInfo *info_list[] = {
 };
 
 #ifndef INCLUDE_IM_ipa
-#define MODULE_ENTRY(function) G_MODULE_EXPORT im_module_ ## function
+#define MODULE_ENTRY(type, function) G_MODULE_EXPORT type im_module_ ## function
 #else
-#define MODULE_ENTRY(function) _gtk_immodule_ipa_ ## function
+#define MODULE_ENTRY(type, function) type _gtk_immodule_ipa_ ## function
 #endif
 
-void
-MODULE_ENTRY (init) (GTypeModule *module)
+MODULE_ENTRY (void, init) (GTypeModule *module)
 {
   ipa_register_type (module);
 }
 
-void 
-MODULE_ENTRY (exit) (void)
+MODULE_ENTRY (void, exit) (void)
 {
 }
 
-void 
-MODULE_ENTRY (list) (const GtkIMContextInfo ***contexts,
-                    int                      *n_contexts)
+MODULE_ENTRY (void, list) (const GtkIMContextInfo ***contexts,
+                          int                      *n_contexts)
 {
   *contexts = info_list;
   *n_contexts = G_N_ELEMENTS (info_list);
 }
 
-GtkIMContext *
-MODULE_ENTRY (create) (const gchar *context_id)
+MODULE_ENTRY (GtkIMContext *, create) (const gchar *context_id)
 {
   if (strcmp (context_id, "ipa") == 0)
     return g_object_new (type_ipa, NULL);
index 6430eaabf960c89c986fad3401c8e61f81f1be6a..13049828d2b4d90380c26d399474070713ac49e5 100644 (file)
@@ -39,32 +39,28 @@ static const GtkIMContextInfo *info_list[] = {
 };
 
 #ifndef INCLUDE_IM_multipress
-#define MODULE_ENTRY(function) G_MODULE_EXPORT im_module_ ## function
+#define MODULE_ENTRY(type, function) G_MODULE_EXPORT type im_module_ ## function
 #else
-#define MODULE_ENTRY(function) _gtk_immodule_multipress_ ## function
+#define MODULE_ENTRY(type, function) type _gtk_immodule_multipress_ ## function
 #endif
 
-void
-MODULE_ENTRY (init) (GTypeModule *module)
+MODULE_ENTRY (void, init) (GTypeModule *module)
 {
   gtk_im_context_multipress_register_type(module);
 }
 
-void 
-MODULE_ENTRY (exit) (void)
+MODULE_ENTRY (void, exit) (void)
 {
 }
 
-void 
-MODULE_ENTRY (list) (const GtkIMContextInfo ***contexts,
-                    int                      *n_contexts)
+MODULE_ENTRY (void, list) (const GtkIMContextInfo ***contexts,
+                          int                      *n_contexts)
 {
   *contexts = info_list;
   *n_contexts = G_N_ELEMENTS (info_list);
 }
 
-GtkIMContext *
-MODULE_ENTRY (create) (const gchar *context_id)
+MODULE_ENTRY (GtkIMContext *, create) (const gchar *context_id)
 {
   if (strcmp (context_id, CONTEXT_ID) == 0)
   {
index 96b9f38b7bfb58b05d6f07784c2b30e62386a3ea..e263620108b10d6a9ff13c5088c38e95455fa7be 100644 (file)
@@ -43,32 +43,28 @@ static const GtkIMContextInfo *info_list[] = {
 };
 
 #ifndef INCLUDE_IM_thai
-#define MODULE_ENTRY(function) G_MODULE_EXPORT im_module_ ## function
+#define MODULE_ENTRY(type, function) G_MODULE_EXPORT type im_module_ ## function
 #else
-#define MODULE_ENTRY(function) _gtk_immodule_thai_ ## function
+#define MODULE_ENTRY(type, function) type _gtk_immodule_thai_ ## function
 #endif
 
-void
-MODULE_ENTRY (init) (GTypeModule *module)
+MODULE_ENTRY (void, init) (GTypeModule *module)
 {
   gtk_im_context_thai_register_type (module);
 }
 
-void 
-MODULE_ENTRY (exit) (void)
+MODULE_ENTRY (void, exit) (void)
 {
 }
 
-void 
-MODULE_ENTRY (list) (const GtkIMContextInfo ***contexts,
-                    int                      *n_contexts)
+MODULE_ENTRY (void, list) (const GtkIMContextInfo ***contexts,
+                          int                      *n_contexts)
 {
   *contexts = info_list;
   *n_contexts = G_N_ELEMENTS (info_list);
 }
 
-GtkIMContext *
-MODULE_ENTRY (create) (const gchar *context_id)
+MODULE_ENTRY (GtkIMContext *, create) (const gchar *context_id)
 {
   if (strcmp (context_id, "thai") == 0)
     return gtk_im_context_thai_new ();
index 63d2cbb5d49a7cd88bb6d9ed0eb78ff6bc57519a..c00350c7b185eeb838bfdcf65837a297e4451e8e 100644 (file)
@@ -461,32 +461,28 @@ static const GtkIMContextInfo *info_list[] = {
 };
 
 #ifndef INCLUDE_IM_ti_er
-#define MODULE_ENTRY(function) G_MODULE_EXPORT im_module_ ## function
+#define MODULE_ENTRY(type, function) G_MODULE_EXPORT type im_module_ ## function
 #else
-#define MODULE_ENTRY(function) _gtk_immodule_ti_er_ ## function
+#define MODULE_ENTRY(type, function) type _gtk_immodule_ti_er_ ## function
 #endif
 
-void
-MODULE_ENTRY (init) (GTypeModule *module)
+MODULE_ENTRY (void, init) (GTypeModule *module)
 {
   ti_er_register_type (module);
 }
 
-void 
-MODULE_ENTRY (exit) (void)
+MODULE_ENTRY (void, exit) (void)
 {
 }
 
-void 
-MODULE_ENTRY (list) (const GtkIMContextInfo ***contexts,
-                    int                      *n_contexts)
+MODULE_ENTRY (void, list) (const GtkIMContextInfo ***contexts,
+                          int                      *n_contexts)
 {
   *contexts = info_list;
   *n_contexts = G_N_ELEMENTS (info_list);
 }
 
-GtkIMContext *
-MODULE_ENTRY (create) (const gchar *context_id)
+MODULE_ENTRY (GtkIMContext *, create) (const gchar *context_id)
 {
   if (strcmp (context_id, "ti_er") == 0)
     return g_object_new (type_ti_er_translit, NULL);
index d438c1f13fb51451e4a68e0dc10cee386f3fdedc..b4bd2001cb151cf5ae6884cc0ce35b52e97044da 100644 (file)
@@ -461,32 +461,28 @@ static const GtkIMContextInfo *info_list[] = {
 };
 
 #ifndef INCLUDE_IM_ti_et
-#define MODULE_ENTRY(function) G_MODULE_EXPORT im_module_ ## function
+#define MODULE_ENTRY(type, function) G_MODULE_EXPORT type im_module_ ## function
 #else
-#define MODULE_ENTRY(function) _gtk_immodule_ti_et_ ## function
+#define MODULE_ENTRY(type, function) type _gtk_immodule_ti_et_ ## function
 #endif
 
-void
-MODULE_ENTRY (init) (GTypeModule *module)
+MODULE_ENTRY (void, init) (GTypeModule *module)
 {
   ti_et_register_type (module);
 }
 
-void 
-MODULE_ENTRY (exit) (void)
+MODULE_ENTRY (void, exit) (void)
 {
 }
 
-void 
-MODULE_ENTRY (list) (const GtkIMContextInfo ***contexts,
-                    int                      *n_contexts)
+MODULE_ENTRY (void, list) (const GtkIMContextInfo ***contexts,
+                          int                      *n_contexts)
 {
   *contexts = info_list;
   *n_contexts = G_N_ELEMENTS (info_list);
 }
 
-GtkIMContext *
-MODULE_ENTRY (create) (const gchar *context_id)
+MODULE_ENTRY (GtkIMContext *, create) (const gchar *context_id)
 {
   if (strcmp (context_id, "ti_et") == 0)
     return g_object_new (type_ti_et_translit, NULL);
index ef072e51b6fda88f5e8f119b99e1dc9c86326cad..20f4d99db2dfe39e9f971cff3112206ab90cde18 100644 (file)
@@ -252,32 +252,28 @@ static const GtkIMContextInfo *info_list[] = {
 };
 
 #ifndef INCLUDE_IM_viqr
-#define MODULE_ENTRY(function) G_MODULE_EXPORT im_module_ ## function
+#define MODULE_ENTRY(type, function) G_MODULE_EXPORT type im_module_ ## function
 #else
-#define MODULE_ENTRY(function) _gtk_immodule_viqr_ ## function
+#define MODULE_ENTRY(type, function) type _gtk_immodule_viqr_ ## function
 #endif
 
-void
-MODULE_ENTRY (init) (GTypeModule *module)
+MODULE_ENTRY (void, init) (GTypeModule *module)
 {
   viqr_register_type (module);
 }
 
-void 
-MODULE_ENTRY (exit) (void)
+MODULE_ENTRY (void, exit) (void)
 {
 }
 
-void 
-MODULE_ENTRY (list) (const GtkIMContextInfo ***contexts,
-                    int                      *n_contexts)
+MODULE_ENTRY (void, list) (const GtkIMContextInfo ***contexts,
+                          int                      *n_contexts)
 {
   *contexts = info_list;
   *n_contexts = G_N_ELEMENTS (info_list);
 }
 
-GtkIMContext *
-MODULE_ENTRY (create) (const gchar *context_id)
+MODULE_ENTRY (GtkIMContext *, create) (const gchar *context_id)
 {
   if (strcmp (context_id, "viqr") == 0)
     return g_object_new (type_viqr_translit, NULL);
index d4125760971c3e7d0c1d0d08f7cda047422b34d1..eae380580b3e781f62258a4f57c39643a540d9d5 100644 (file)
@@ -36,33 +36,29 @@ static const GtkIMContextInfo *info_list[] = {
 };
 
 #ifndef INCLUDE_IM_xim
-#define MODULE_ENTRY(function) G_MODULE_EXPORT im_module_ ## function
+#define MODULE_ENTRY(type, function) G_MODULE_EXPORT type im_module_ ## function
 #else
-#define MODULE_ENTRY(function) _gtk_immodule_xim_ ## function
+#define MODULE_ENTRY(type, function) type _gtk_immodule_xim_ ## function
 #endif
 
-void
-MODULE_ENTRY (init) (GTypeModule *type_module)
+MODULE_ENTRY (void, init) (GTypeModule *type_module)
 {
   gtk_im_context_xim_register_type (type_module);
 }
 
-void 
-MODULE_ENTRY (exit) (void)
+MODULE_ENTRY (void, exit) (void)
 {
   gtk_im_context_xim_shutdown ();
 }
 
-void 
-MODULE_ENTRY (list) (const GtkIMContextInfo ***contexts,
-                    int                      *n_contexts)
+MODULE_ENTRY (void, list) (const GtkIMContextInfo ***contexts,
+                          int                      *n_contexts)
 {
   *contexts = info_list;
   *n_contexts = G_N_ELEMENTS (info_list);
 }
 
-GtkIMContext *
-MODULE_ENTRY (create) (const gchar *context_id)
+MODULE_ENTRY (GtkIMContext *, create) (const gchar *context_id)
 {
   if (strcmp (context_id, "xim") == 0)
     return gtk_im_context_xim_new ();